Fix a mixup in popover realization
authorMatthias Clasen <mclasen@redhat.com>
Sat, 25 Oct 2014 03:36:35 +0000 (23:36 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 25 Oct 2014 03:36:35 +0000 (23:36 -0400)
When the window is on a non-default screen, popover_realize
ended up passing a visual and a parent_window from different
screens into gdk_window_new, which doesn't work. Fix it by
using the visual of the parent window.

gtk/gtkwindow.c

index 11a22200e10ecc60bf2c5ac3ac181b6c1c480c4a..08afd8f58ca604130379e9dd5df04cf1ad53086e 100644 (file)
@@ -6299,7 +6299,7 @@ popover_realize (GtkWidget        *widget,
   attributes.y = rect.y;
   attributes.width = rect.width;
   attributes.height = rect.height;
-  attributes.visual = gtk_widget_get_visual (widget);
+  attributes.visual = gtk_widget_get_visual (GTK_WIDGET (window));
   attributes.event_mask = gtk_widget_get_events (popover->widget) |
     GDK_EXPOSURE_MASK;
   attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;